package com.enumeration.demo03;

public enum Weekday {
    SUN(0,"星期天"),
    MON(1,"星期一"),
    TUE(2,"星期二"),
    WED(3,"星期三"),
    THU(4,"星期四"),
    FRI(5,"星期五"),
    SAT(6,"星期六");

    private int num;
    private String desc;

    Weekday(int num, String desc) {
        this.num = num;
        this.desc = desc;
    }

    public int getNum() {
        return num;
    }

    public String getDesc() {
        return desc;
    }

    public void run() {
        System.out.println("定义普通方法！");
    }

    public static void go() {
        System.out.println("静态方法直接调用");
    }


    @Override
    public String toString() {
        return this.desc;
    }
}
